Skip to content

Fix PSResourceGet CI for ContainerRegistry #1829

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 26 commits into from
Jun 17, 2025
Merged

Conversation

adityapatwardhan
Copy link
Member

@adityapatwardhan adityapatwardhan commented Jun 13, 2025

PR Summary

This pull request includes updates to the Azure SDK version, enhancements to logging and debugging, and improvements to error handling for Azure access token retrieval. The most important changes are grouped below by theme.

Dependency Updates:

  • Updated Azure SDK dependency Azure.Identity from version 1.11.4 to 1.14.0 in Microsoft.PowerShell.PSResourceGet.csproj.
  • Updated the .NET SDK version in global.json from 8.0.406 to 8.0.411.

Logging and Debugging Enhancements:

  • Added debug logging to indicate whether a repository is unauthenticated in GetContainerRegistryAccessToken.
  • Added debug logging when retrieving an anonymous access token from a realm in IsContainerRegistryUnauthenticated.

Error Handling Improvements:

  • Modified GetAzAccessToken to accept a PSCmdlet parameter for logging warnings and implemented a timeout mechanism with CancellationTokenSource to prevent indefinite waits. Added specific error handling for timeout and general exceptions. [1] [2]

Configuration Updates:

  • Added a pwsh parameter set to true in .ci/test.yml to enable PowerShell Core in CI tests.

Code Simplification:

  • Removed redundant debug logging from ProcessResourceNameParameterSet in FindPSResource.cs.

PR Context

PR Checklist

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan adityapatwardhan changed the title Add debug statements Fix PSResourceGet CI for ContainerRegistry Jun 17, 2025
Copy link
Member

@anamnavi anamnavi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adityapatwardhan adityapatwardhan merged commit c637fcf into master Jun 17, 2025
12 checks passed
@adityapatwardhan adityapatwardhan deleted the FixAzAuthCI branch June 17, 2025 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants